//package com.he.hsdyc.config.redis;
//
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import redis.clients.jedis.Jedis;
//import redis.clients.jedis.JedisPool;
//import redis.clients.jedis.JedisPoolConfig;
//
//
//@Configuration
//@EnableConfigurationProperties(RedisProperties.class)
//public class RedisConfigPush {
//    private Logger logger =  LoggerFactory.getLogger(RedisConfigPush.class);
//
//    @Autowired
//    private RedisProperties properties;
//
//    @Bean
//    public JedisPoolConfig getRedisConfig(){
//        JedisPoolConfig config = new JedisPoolConfig();
//        return config;
//    }
//
//    @Bean
//    public JedisPool getJedisPool(){
//        JedisPoolConfig config = getRedisConfig();
//        JedisPool pool = new JedisPool(config,properties.getHostName(),properties.getPort(),properties.getTimeout(),properties.getPassword(),properties.getDb());
//        logger.info("init redisPool ...");
//        return pool;
//    }
//
//    @Bean
//    public Jedis getJedis(){
//        JedisPool pool=getJedisPool();
//        logger.info("init Jedis ...");
//        return pool.getResource();
//    }
//
//}
